package com.company.show.factorys.normal;


/**
 * @author yingfing
 * @create 2020--10--07 16:21
 * @describe
 */
public class SenderFactory {
    public Sender produce(String type) {
        if ("email".equalsIgnoreCase(type)) {
            return new EmailSender();
        } else if ("sms".equalsIgnoreCase(type)) {
            return new SmsSender();
        } else {
            System.out.println("请输入正确的类型 ! ");
            return null;
        }
    }
}
